//
//  SimScaleFlowView.h
//  Knowbox
//
//  Created by LiuXubin on 14/12/30.
//  Copyright (c) 2014年 knowin. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kPageViewBaseTag 10

@class SimScaleFlowView;

@protocol  SimScaleFlowViewDelegate<NSObject>
@optional
- (void)flowView:(SimScaleFlowView *)flowView willDisppearPage:(NSInteger)page;
- (void)flowView:(SimScaleFlowView *)flowView didShowPage:(NSInteger)page;

@end

@protocol SimScaleFlowViewDataSource <NSObject>
- (NSInteger)numberOfPagesInFlowView:(SimScaleFlowView *)flowView;
- (UIView *)flowView:(SimScaleFlowView *)flowView viewAtIndex:(NSInteger)index;
- (CGSize)sizeForFlowView:(SimScaleFlowView *)flowView;

@optional
- (UIView *)flowView:(SimScaleFlowView *)flowView separateLineAtIndex:(NSInteger)index;

@end

@interface SimScaleFlowView : UIView<UIScrollViewDelegate>{
    
}

@property (nonatomic, weak) id <SimScaleFlowViewDataSource> dataSource;
@property (nonatomic, weak) id <SimScaleFlowViewDelegate> delegate;


@property (nonatomic) CGFloat minViewScale;
@property (nonatomic) CGFloat maxViewScale;
@property (nonatomic) CGFloat viewGap;
@property (nonatomic) CGFloat offScreenX;
@property (nonatomic, readonly) NSInteger currentIndex;


- (void)reloadData;
- (void)scrollToPage:(NSUInteger)pageNumber animated:(BOOL)animated;
- (UIView *)viewForPage:(NSInteger)index;
- (NSArray *)allVisibleViews;

@end
